<?php

namespace App\Http\Requests\Landscaping;

use Illuminate\Foundation\Http\FormRequest;
use App\Http\Requests\BaseRequest;

class VegetationRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            // 'type' => 'required',
            'name' => 'required',
            // 'number' => 'required|integer',
            // 'version' => 'required',
            // 'unit' => 'required',
            // 'sign' => 'required'
        ];
    }

    public function messages() 
    {
        return [
            'type.required' => '植被类型不能为空',
            'name.required' => '植被名称不能为空',
            'number.required' => '植被株数不能为空',
            'number.integer' => '植被株数只能填写数字',
            'version.required' => '植被规格不能为空',
            'unit.required' => '计量单位不能为空',
            'sign.required' => '植被生长情况不能为空'
        ];
    }

}
